package com.bilibili.ifelse;

import java.util.Scanner;

public class arr {
    public static void main(String[] args) {
        char arr[]={'玩','原','神','玩','的'};
        System.out.println(arr.length);
        System.out.println(arr);
        int arr1[]={1,2,3,4,5};
        System.out.println(arr1);
        int a = arr1.length;
        for (int i =0 ; i<a ; i++){
            System.out.printf("%d",arr1[i]);
        }
        System.out.println();
        double arr2[] = new double[4];
        Scanner num = new Scanner(System.in);
        for (int i =0 ; i<4 ; i++ )
        {
            System.out.println("请输入第"+(i+1)+"个数");
            arr2[i]=num.nextDouble();
        }
        double max = 0 , all = 0 , min = 9999999 ;
        for (int i =0 ; i<4 ; i++) {
            if (max < arr2[i]) {
                max = arr2[i];
            }
            if (min > arr2[i]) {
                min = arr2[i];
            }
            all += arr2[i];
            System.out.printf("%.2f,",arr2[i]);
        }
        System.out.printf("最大数是：%.2f\n最小数是：%.2f\n总和是：%.2f\n",max,min,all);
    }
}
